import request from '@/utils/request'

// 获得图库列表
export function getGalleryList(params) {
  return request({
    url: '/merchant/api/v1/gallery',
    method: 'get',
    params
  })
}
// 获得全部标签
export function getTags() {
  return request({
    url: '/merchant/api/v1/gallery/tags',
    method: 'get'
  })
}
// 获得下载地址
export function getDownloadUrl(id) {
  return request({
    url: `/merchant/api/v1/gallery/download/${id}`,
    method: 'get'
  })
}
// 申请图库授权
export function applyGallery(id, data) {
  return request({
    url: `/merchant/api/v1/gallery/apply/${id}`,
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 申请记录
export function getLogsList(params) {
  return request({
    url: '/merchant/api/v1/gallery/logs',
    method: 'get',
    params
  })
}
